package com.lxw.nonghe.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
/**
 * <p>
 * 权限表
 * </p>
 *
 * @author lxw
 * @since 2025-04-17
 */
@Data
@Accessors(chain = true)
@TableName("t_permission")
@ApiModel(value = "Permission对象", description = "权限表")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("权限唯一标识")
    @TableId(type = IdType.AUTO)
    private Integer permissionId;

    @ApiModelProperty("权限名称（如：user:add、family:query等）")
    private String permissionName;

    @ApiModelProperty("权限编码")
    private String permissionCode;

    @ApiModelProperty("权限详细描述")
    private String permissionDesc;

    @ApiModelProperty("父权限ID，0表示一级权限")
    private Integer parentId = 0;

    @ApiModelProperty("排序字段")
    private Integer sort;

    @ApiModelProperty("子权限列表")
    @TableField(exist = false)
    private List<Permission> children;
}
